#include <iostream>
using namespace std;

int main()
{
    int A, N;
    double S;
    while(true)
    {
        S = 0;
        cout<<"Enter A : ";cin>>A;
        for(N = 1; S < A; N++)
        {

            system("cls");
            cout<<"A = "<<A<<endl;
            cout<<"S = "<<S<<endl;
            cout<<"N = "<<N<<endl;
            S += 1.0/N;
        }
    }
    return 0;
}
